package com.example.ordersystem.domain;



import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class Order implements Serializable {

    /**
     * 订单编号
     */

    private String num;

    /**
     * 顾客编号
     */

    private int customer;

    /**
     * 订单总价
     */

    private int total;

    /**
     * 订单日期
     */

    private String birth;

    /**
     * 顾客收货地址
     */
    private String customeraddress;

    /**
     * 顾客备注
     */

    private String remark;

    /**
     * 交易状态
     */

    private String status;


    /**
     * 支付宝沙箱环境,交易成功返回的状态
     */
    public static final String SUCCESS = "TRADE_SUCCESS";
    public static final String CLOSED = "TRADE_CLOSED";
    public static final String WAIT_BUYER_PAY = "WAIT_BUYER_PAY";
    public static final String FINISHED = "TRADE_FINISHED";
    public static final String REFUNDING="退款中";
    public static final Map<String, String> TRADE_STATUS = new HashMap<String, String>() {{
        put(WAIT_BUYER_PAY, "待付款");
        put(CLOSED, "交易关闭");
        put(SUCCESS, "支付成功");
        put(FINISHED, "交易完成");
    }};

    public Order() {
        super();
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public int getCustomer() {
        return customer;
    }

    public void setCustomer(int customer) {
        this.customer = customer;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    public String getCustomeraddress() {
        return customeraddress;
    }

    public void setCustomeraddress(String customeraddress) {
        this.customeraddress = customeraddress;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public static String getSUCCESS() {
        return SUCCESS;
    }

    public static String getCLOSED() {
        return CLOSED;
    }

    public static String getWaitBuyerPay() {
        return WAIT_BUYER_PAY;
    }

    public static String getFINISHED() {
        return FINISHED;
    }

    public static String getREFUNDING() {
        return REFUNDING;
    }

    public static Map<String, String> getTradeStatus() {
        return TRADE_STATUS;
    }
}
